package com.topisv.tms.repository.pickCar;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.pickCar.PickCarStockSku;

/**
 * 拣选车明细_DAO
 * @author ch
 *
 */
public abstract interface PickCarStockSkuDao extends PagingAndSortingRepository<PickCarStockSku, Long>, JpaSpecificationExecutor<PickCarStockSku>
{

	@Query("select t from PickCarStockSku t where t.stock.id=?")
	List<PickCarStockSku> loadByStockId(Long stockId);

	@Query("select t from PickCarStockSku t where t.car.id=? and t.taskCode=? and t.upStatus='0'")
	List<PickCarStockSku> loadUnSet(Long carId,String taskCode);

	@Query("select t from PickCarStockSku t where t.car.id=?")
	List<PickCarStockSku> loadByCarId(Long carId);

}